package com.itlong.cloud.project.operate;

import com.itlong.cloud.POJO.DTO.operate.*;
import com.itlong.cloud.POJO.VO.operate.WwLyOperateAppInfoVO;
import com.itlong.cloud.POJO.VO.operate.WwOperateDeveloperAccountVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <des>
 *    应用业务处理暴露接口
 * <des>
 *
 * @create Date 2021-08-18
 **/
@FeignClient(name = "project-service")
public interface IOperateWwAppServiceClient {

      /**
      * <desc>
      *      获取应用列表
      * </desc>
      * @param wwOperateSelectAppDTO
      * @return: com.itlong.cloud.utils.page.Page<com.itlong.cloud.POJO.VO.operate.WwOperateAppInfoVO>
      * @author LiuYu
      * @date: 2021-08-18
       **/
      @RequestMapping(path = "/operate/getAppPageList", method = RequestMethod.POST)
      Page<WwLyOperateAppInfoVO> getAppPageList(@RequestBody WwOperateSelectAppDTO wwOperateSelectAppDTO);

      /**
       * <desc>
       *     创建应用
       * </desc>
       * @param wwLyOperateCreateAppInfoDTO
       * @return: java.lang.Integer
       * @author LiuYu
       * @date: 2021-08-19
       **/
      @RequestMapping(path = "/operate/saveAppInfo", method = RequestMethod.POST)
      Integer save(@RequestBody WwLyOperateCreateAppInfoDTO wwLyOperateCreateAppInfoDTO) throws Exception;

      /**
       * <desc>
       *     修改应用
       * </desc>
       * @param wwLyOperateUpdateAppInfoDTO
       * @return: java.lang.Integer
       * @author LiuYu
       * @date: 2021-08-19
       **/
      @RequestMapping(path = "/operate/updateAppInfo", method = RequestMethod.POST)
      Integer update(@RequestBody WwLyOperateUpdateAppInfoDTO wwLyOperateUpdateAppInfoDTO) throws Exception;


      /**
       * <desc>
       *     添加开发者账号
       * </desc>
       * @param wwLyCreateDeveloperAccountDTO
       * @return: java.lang.Integer
       * @author LiuYu
       * @date: 2021-08-19
       **/
      @RequestMapping(path = "/operate/saveDeveloper", method = RequestMethod.POST)
      Integer saveDeveloperAccount(@RequestBody WwLyCreateDeveloperAccountDTO wwLyCreateDeveloperAccountDTO) throws Exception;

      /**
       * <desc>
       *    安全设置
       * </desc>
       * @param ipAddresses
       * @param appId
       * @return: java.lang.Integer
       * @author LiuYu
       * @date: 2021-08-23
       **/
      @RequestMapping(path = "/operate/setSecurity", method = RequestMethod.POST)
      Integer updateSecuritySetting(@RequestParam("ipAddresses") String ipAddresses,@RequestParam("appId") String appId);

      /**
       * <desc>
       *   启用禁用
       * </desc>
       * @param status
       * @param appId
       * @return: java.lang.Integer
       * @author LiuYu
       * @date: 2021-08-23
       **/
      @RequestMapping(path = "/operate/setStatus", method = RequestMethod.POST)
      Integer updateStatus(@RequestParam("status") Integer status,@RequestParam("appId") String appId);

      /**
      * <desc>
      *   有效期授权
      * </desc>
      * @param wwLyOperateUpdateEffectTimeDTO
      * @return: java.lang.Integer
      * @author LiuYu
      * @date: 2021-08-23
       **/
      @RequestMapping(path = "/operate/updateEffectTime", method = RequestMethod.POST)
      Integer updateEffectTime(@RequestBody WwLyOperateUpdateEffectTimeDTO wwLyOperateUpdateEffectTimeDTO) throws Exception;
//      /**
//      * <desc>
//      *     上传图片
//      * </desc>
//      * @param file
//      * @return: java.lang.String
//      * @author LiuYu
//      * @date: 2021-08-19
//       **/
//      @RequestMapping(path = "/operate/uploadImage", method = RequestMethod.POST,consumes = "multipart/form-data")
//      String  uploadImage(@RequestPart("file") MultipartFile file) throws IOException;

      /**
      * <desc>
      *     查询开发者账号列表
      * </desc>
      * @param wwOperateSelectDeveloperAccountDTO
      * @return: com.itlong.cloud.utils.page.Page<com.itlong.cloud.POJO.VO.operate.WwOperateDeveloperAccountVO>
      * @author LiuYu
      * @date: 2021-08-19
       **/
      @RequestMapping(path = "/operate/getDeveloperAccountPageList", method = RequestMethod.POST)
      Page<WwOperateDeveloperAccountVO> getDeveloperAccountPageList(@RequestBody WwOperateSelectDeveloperAccountDTO wwOperateSelectDeveloperAccountDTO) throws Exception;

//      /**
//      * <desc>
//      *     查询项目列表
//      * </desc>
//      * @param wwOperateSelectProjectDTO
//      * @return: com.itlong.cloud.utils.page.Page<com.itlong.cloud.POJO.VO.operate.WwOperateProjectInfoVO>
//      * @author LiuYu
//      * @date: 2021-08-19
//       **/
//      @RequestMapping(path = "/operate/getProjectPageList", method = RequestMethod.POST)
//      Page<WwOperateProjectInfoVO> getProjectPageList(@RequestBody WwOperateSelectProjectDTO wwOperateSelectProjectDTO) throws Exception;


}
